﻿<Tree Items="@GetIconItems()" ShowIcon="true" ShowCheckbox="true" />

@code {
    private static IEnumerable<TreeItem> GetIconItems()
    {
        var ret = new List<TreeItem>
        {
            new TreeItem() { Text = "导航一", Icon = "fa fa-fa fa-fw" },
            new TreeItem() { Text = "导航二", Icon = "fa fa-fa fa-fw" },
            new TreeItem() { Text = "导航三", Icon = "fa fa-fa fa-fw" }
        };

        ret[1].AddItem(new TreeItem() { Text = "子菜单一", Icon = "fa fa-fa fa-fw" });
        ret[1].AddItem(new TreeItem() { Text = "子菜单二", Icon = "fa fa-fa fa-fw" });
        ret[1].AddItem(new TreeItem() { Text = "子菜单三", Icon = "fa fa-fa fa-fw" });

        return ret;
    }
}
